1. Field of the Invention
The present invention relates to rule-based expert control systems using fuzzy logic, as well as pattern and data recognition systems such as barcode readers.
2. Description of the Related Art
Control systems and computer-controlled electronic devices have historically been controlled by digital control systems. Such control systems use hi-state digital logic which requires a value of either "TRUE" or "FALSE", so that approximations are often required of real-world control problems. For example, an input/output relationship y=f(x) would be specified either as a mathematical function or as a series of points using, for example, a look-up table: the former use of a mathematical function may require complex mathematics to accurately represent real-world control problems; further, the latter use of a look-up table, such as a ROM, introduces problems such as large memory requirements for adequate approximation, the concomitant addressing function associated with large memories, as well as interpolation problems.
For example, FIG. 1A shows an exemplary nonlinear sigmoidal function y=f(x). If digital logic was used to characterize the function y=f(x), it would be necessary to approximate the function shown in FIG. 1A by using discrete values, y.sub.i =a.sub.i .multidot.x.sub.i (i=1, 2, . . . , n), as shown in FIG. 1B. Since the number n of "crisp" values is limited, there inherently exists an interpolation error for values of x between x.sub.i and x.sub.i+1. The term "crisp" refers to an input having a single discrete value. In addition, it becomes impractical to write a rule for every input combination where there exists a large number of inputs whose values can cover a wide input range.
An alternative approach to control theory, known as "fuzzy logic", was developed by L. Zadeh in 1963. Rather than evaluating the two values "TRUE" and "FALSE" as in digital logic, fuzzy terms admit to degrees of membership in multiple sets so that fuzzy rules may have a continuous, rather than stepwise, range of truth of possibility. For example, in applying fuzzy logic, a person need not strictly be included or excluded as a member from a set of "tall persons"; rather, to the extent a person may be "tall" to a greater or lesser degree, the member is assigned to the set with a degree of membership between the values of "1" and "0".
FIG. 1C illustrates the principle of fuzzy logic in evaluating the function illustrated in FIG. 1A. The function f(x) is approximated by a plurality of fuzzy sets 10 which overlap. Rather than approximating a continuous value x by a discrete value x.sub.i, fuzzy logic determines for a given value x whether the value x is nearest to the center of a fuzzy set 10. If an x value is equidistant from two or more fuzzy sets, the resultant y value can be made proportional to the output values suggested by all the fuzzy sets of which the value x is a member. Thus, a fuzzy number may be two dimensional, having assigned fuzzy sets and corresponding membership values.
Since fuzzy logic can operate within the relative imprecision of the real-world environment, the advantages of fuzzy logic and fuzzy set theory have become apparent in numerous areas, such as robotics, natural language recognition, the automobile and aircraft industry, artificial intelligence, etc.
An efficient implementation of fuzzy logic for a controller has been disclosed in U.S. Pat. No. 5,245,695 to Basehore. Specifically, Basehore discloses a fuzzification method for determining the similarity of the crisp input (e.g., the discrete demultiplexed signal undergoing fuzzification) to a fuzzy set. As shown in FIG. 2A, the degree of similarity between the crisp inputs X.sub.a and X.sub.b and the fuzzy set is defined by a membership function .mu.. The fuzzification method shown in FIG. 2B disregards the shape of the membership function .mu. and instead determines the distance of the crisp input from a defined center of the membership function .mu.; the distance of the crisp input is then linearly complemented with respect to the width of the membership function .mu. so that the resulting similarity signal is a maximum when the distance is a minimum, and, conversely, a minimum when the distance is a maximum (e.g., when the crisp input exceeds the width of the membership function .mu.).
The co-pending application 08/41,235 recognized that it would be desirable to provide a simple implementation of fuzzy sets that has membership functions defined on the basis of varying parameters in order to provide a fully adaptive fuzzy logic system. Such an implementation would be effective in more advanced applications of fuzzy logic that require a fuzzy logic microcontroller capable of processing complex membership functions that have varying parameters. Specifically, the copending application 08/41,235 enabled the membership function parameter data to be directly supplied to the fuzzy input processor. As a result, a center could be defined as a predetermined value or a value supplied from an input source. The assignment of an input source to be a center value caused the corresponding membership function to have a variable, or "floating" center. Similarly, the membership function width data could be supplied from memory as predetermined data or from an input source as described above, thereby providing dynamic width fuzzifiers.